package com.ncucoder.dpt.strategy;

import com.ncucoder.dpt.strategy.impl.OperationAdd;
import com.ncucoder.dpt.strategy.impl.OperationMultiply;
import com.ncucoder.dpt.strategy.impl.OperationSubstract;

/**
 * @author <a href="https://edit.ncucoder.com">hsowan</a>
 * @since 2018-12-13 20:51
 */
public class Test {
    public static void main(String[] args) {
        Context context = new Context(new OperationAdd());
        System.out.println("10 + 5 = " + context.executeStrategy(10, 5));

        context = new Context(new OperationSubstract());
        System.out.println("10 - 5 = " + context.executeStrategy(10, 5));

        context = new Context(new OperationMultiply());
        System.out.println("10 * 5 = " + context.executeStrategy(10, 5));
    }
}
